/*
 * Copyright (c) 2019.
 * 北京九思金信科技有限公司对该文件内容保留所有权利。
 * 未经许可，不得私自拷贝、传播、发布、引用该文件内容，违者将被追究法律责任。
 */

import Vue from 'vue'
import Router from 'vue-router'

// 报价测算
import Calculate from '../components/QuoteCalculate'
import QuoteCalculateIndex from '../components/QuoteCalculateIndex'
import QuoteCalculateResult from '../components/QuoteCalculateResult'
import QuoteCalculateAdd from '../components/QuoteCalculateAdd'
import QuoteCalculateIntroduce from '../components/QuoteCalculateIntroduce'
import QuoteCalculateSearch from '../components/QuoteCalculateSearch'

Router.prototype.goBack = function() {
  this.isBack = true
  window.history.go(-1)
}

Vue.use(Router)

export default new Router({
  routes: [
    {
      // 报价测算
      path: '/calculator',
      name: 'calculate',
      component: Calculate,
      children: [
        {
          path: '',
          name: 'quoteCalculateIndex',
          component: QuoteCalculateIndex
        },
        {
          path: 'quoteCalculateAdd',
          name: 'quoteCalculateAdd',
          component: QuoteCalculateAdd
        },
        {
          path: 'quoteCalculateResult',
          name: 'quoteCalculateResult',
          component: QuoteCalculateResult
        },
        {
          path: 'quoteCalculateIntroduce',
          name: 'quoteCalculateIntroduce',
          component: QuoteCalculateIntroduce
        },
        {
          path: 'quoteCalculateSearch',
          name: 'quoteCalculateSearch',
          component: QuoteCalculateSearch
        }
      ]
    }
  ]
})
